package com.yuhanginfo.modules.web.entity;

import java.math.BigDecimal;
import java.util.Date;

import org.hibernate.validator.constraints.Length;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.yuhanginfo.common.persistence.WebDataEntity;

/**
 * 订单详情Entity
 * @author yangs
 * @version 2017-09-18
 */
public class WebOrdersDetail extends WebDataEntity<WebOrdersDetail> implements Cloneable {
	
	private static final long serialVersionUID = 1L;
	private static final Logger logger =  LoggerFactory.getLogger(WebOrdersDetail.class);
	private String ordersCode;		// 订单号
	private String goodsCode;		// 商品号
	private String goodsCnName;		// 商品中文名
	private String goodsEnName;		// 商品英文名
	private String partsCode;		// 配件号
	private Integer num;		// 数量
	private BigDecimal price;		// 单价
	private BigDecimal modifyPrice;		// 变更前单价
	private Integer modifyNum;		//变更前数量
	private String isHistroy;		// 是否历史:0否，1是
	private String fhNum;
	private BigDecimal totalMoney;
	private String yuNum;
	private String cnName;
	private String logistics;
	private String logisticsCode;
	private String ordersChangeCode;
	private String storeName;
	private String state;
	private Date payDate;
	
	public Date getPayDate() {
		return payDate;
	}

	public void setPayDate(Date payDate) {
		this.payDate = payDate;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getStoreName() {
		return storeName;
	}

	public void setStoreName(String storeName) {
		this.storeName = storeName;
	}

	public String getStoreType() {
		return storeType;
	}

	public void setStoreType(String storeType) {
		this.storeType = storeType;
	}

	private String storeType;
	//
	private Integer ordersTransportType;
	
	
	public String getCnName() {
		return cnName;
	}

	public void setCnName(String cnName) {
		this.cnName = cnName;
	}

	public String getLogistics() {
		return logistics;
	}

	public void setLogistics(String logistics) {
		this.logistics = logistics;
	}

	public String getLogisticsCode() {
		return logisticsCode;
	}

	public void setLogisticsCode(String logisticsCode) {
		this.logisticsCode = logisticsCode;
	}

	public String getYuNum() {
		return yuNum;
	}

	public void setYuNum(String yuNum) {
		this.yuNum = yuNum;
	}

	

	public BigDecimal getTotalMoney() {
		return totalMoney;
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}

	public String getFhNum() {
		return fhNum;
	}

	public void setFhNum(String fhNum) {
		this.fhNum = fhNum;
	}

	public WebOrdersDetail() {
		super();
	}

	public WebOrdersDetail(String id){
		super(id);
	}

	@Length(min=0, max=30, message="订单号长度必须介于 0 和 30 之间")
	public String getOrdersCode() {
		return ordersCode;
	}

	public void setOrdersCode(String ordersCode) {
		this.ordersCode = ordersCode;
	}
	
	@Length(min=0, max=30, message="商品号长度必须介于 0 和 30 之间")
	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}
	
	@Length(min=0, max=50, message="商品中文名长度必须介于 0 和 50 之间")
	public String getGoodsCnName() {
		return goodsCnName;
	}

	public void setGoodsCnName(String goodsCnName) {
		this.goodsCnName = goodsCnName;
	}
	
	@Length(min=0, max=50, message="商品英文名长度必须介于 0 和 50 之间")
	public String getGoodsEnName() {
		return goodsEnName;
	}

	public void setGoodsEnName(String goodsEnName) {
		this.goodsEnName = goodsEnName;
	}
	
	@Length(min=0, max=50, message="配件号长度必须介于 0 和 50 之间")
	public String getPartsCode() {
		return partsCode;
	}

	public void setPartsCode(String partsCode) {
		this.partsCode = partsCode;
	}
	
	@Length(min=0, max=11, message="数量长度必须介于 0 和 11 之间")
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}
	
	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}
	
	public BigDecimal getModifyPrice() {
		return modifyPrice;
	}

	public void setModifyPrice(BigDecimal modifyPrice) {
		this.modifyPrice = modifyPrice;
	}
	
	@Length(min=0, max=11, message="是否历史:0否，1是长度必须介于 0 和 11 之间")
	public String getIsHistroy() {
		return isHistroy;
	}

	public void setIsHistroy(String isHistroy) {
		this.isHistroy = isHistroy;
	}

	public Integer getOrdersTransportType() {
		return ordersTransportType;
	}

	public void setOrdersTransportType(Integer ordersTransportType) {
		this.ordersTransportType = ordersTransportType;
	}

	public Integer getModifyNum() {
		return modifyNum;
	}

	public void setModifyNum(Integer modifyNum) {
		this.modifyNum = modifyNum;
	}

	public String getOrdersChangeCode() {
		return ordersChangeCode;
	}

	public void setOrdersChangeCode(String ordersChangeCode) {
		this.ordersChangeCode = ordersChangeCode;
	}

	public WebOrdersDetail clone() {
		try {
			return (WebOrdersDetail)super.clone();
		} catch (CloneNotSupportedException e) {
			logger.error(e.getMessage(),e);
			return null;
		}
	}
}